<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Linux 机器时钟同步 | Aurthur Article</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="前言在Linux系统中，为了避免主机时间因为在长时间运行下所导致的时间偏差。Linux系统下，一般使用ntp服务来同步不同机器的时间。
NTP 是网络时间协议（Network Time Protocol）的简称，就是通过网络协议使计算机之间的时间同步化。
准确的系统时间是稳定服务的基础，本文介绍与时间相关的Linux操作、以及如何为自己的Linux服务器维护准确的时间。">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux 机器时钟同步">
<meta property="og:url" content="http://aurthur.gitos.cn/Aurthur-2016/linux-datetime-sync.html">
<meta property="og:site_name" content="Aurthur Article">
<meta property="og:description" content="前言在Linux系统中，为了避免主机时间因为在长时间运行下所导致的时间偏差。Linux系统下，一般使用ntp服务来同步不同机器的时间。
NTP 是网络时间协议（Network Time Protocol）的简称，就是通过网络协议使计算机之间的时间同步化。
准确的系统时间是稳定服务的基础，本文介绍与时间相关的Linux操作、以及如何为自己的Linux服务器维护准确的时间。">
<meta property="og:updated_time" content="2017-01-07T12:46:31.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux 机器时钟同步">
<meta name="twitter:description" content="前言在Linux系统中，为了避免主机时间因为在长时间运行下所导致的时间偏差。Linux系统下，一般使用ntp服务来同步不同机器的时间。
NTP 是网络时间协议（Network Time Protocol）的简称，就是通过网络协议使计算机之间的时间同步化。
准确的系统时间是稳定服务的基础，本文介绍与时间相关的Linux操作、以及如何为自己的Linux服务器维护准确的时间。">
  
  
    <link rel="icon" href="/uploads/blog.ico">
  
  <link rel="stylesheet" href="/css/style.css">
</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="/uploads/blog.png" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/">Aurthur</a></h1>
		</hgroup>

		
		<p class="header-subtitle">Aurthur Blog</p>
		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						
						<div class="icon-wrap icon-me hide" data-idx="3">
							<div class="user"></div>
							<div class="shoulder"></div>
						</div>
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>菜单</li>
						<li>标签</li>
						
						
						<li>关于我</li>
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">主页</a></li>
				        
							<li><a href="/archives">所有文章</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
								<a class="github" target="_blank" href="https://github.com/aurthurxlc" title="github">github</a>
					        
								<a class="zhihu" target="_blank" href="https://www.zhihu.com/people/aurthur" title="zhihu">zhihu</a>
					        
								<a class="mail" target="_blank" href="/aurthurxlc@gmail.com" title="mail">mail</a>
					        
								<a class="google" target="_blank" href="https://plus.google.com/u/0/110645540964195673210" title="google">google</a>
					        
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						<a href="/tags/ADB/" style="font-size: 10px;">ADB</a> <a href="/tags/API/" style="font-size: 10px;">API</a> <a href="/tags/Android/" style="font-size: 10px;">Android</a> <a href="/tags/Apache/" style="font-size: 12.5px;">Apache</a> <a href="/tags/CentOS/" style="font-size: 15px;">CentOS</a> <a href="/tags/Centos/" style="font-size: 12.5px;">Centos</a> <a href="/tags/Chkconfig/" style="font-size: 10px;">Chkconfig</a> <a href="/tags/Electron/" style="font-size: 10px;">Electron</a> <a href="/tags/FTP/" style="font-size: 10px;">FTP</a> <a href="/tags/FastCGI/" style="font-size: 10px;">FastCGI</a> <a href="/tags/Iterm/" style="font-size: 10px;">Iterm</a> <a href="/tags/Java/" style="font-size: 15px;">Java</a> <a href="/tags/Kernel/" style="font-size: 10px;">Kernel</a> <a href="/tags/Linux/" style="font-size: 17.5px;">Linux</a> <a href="/tags/Mac/" style="font-size: 12.5px;">Mac</a> <a href="/tags/Mirror/" style="font-size: 10px;">Mirror</a> <a href="/tags/Mysql/" style="font-size: 12.5px;">Mysql</a> <a href="/tags/Nginx/" style="font-size: 12.5px;">Nginx</a> <a href="/tags/PHP/" style="font-size: 20px;">PHP</a> <a href="/tags/RESTful/" style="font-size: 10px;">RESTful</a> <a href="/tags/Regular-Expression/" style="font-size: 10px;">Regular Expression</a> <a href="/tags/SSH/" style="font-size: 10px;">SSH</a> <a href="/tags/SSL/" style="font-size: 10px;">SSL</a> <a href="/tags/Sass/" style="font-size: 10px;">Sass</a> <a href="/tags/Server/" style="font-size: 10px;">Server</a> <a href="/tags/Terminal/" style="font-size: 10px;">Terminal</a> <a href="/tags/Ubuntu/" style="font-size: 10px;">Ubuntu</a> <a href="/tags/VPN/" style="font-size: 10px;">VPN</a> <a href="/tags/Vagrant/" style="font-size: 10px;">Vagrant</a> <a href="/tags/Volume/" style="font-size: 12.5px;">Volume</a> <a href="/tags/Web/" style="font-size: 12.5px;">Web</a> <a href="/tags/Windows/" style="font-size: 10px;">Windows</a> <a href="/tags/compile/" style="font-size: 10px;">compile</a> <a href="/tags/dd/" style="font-size: 10px;">dd</a> <a href="/tags/develop-tools/" style="font-size: 10px;">develop tools</a> <a href="/tags/gitlab/" style="font-size: 10px;">gitlab</a> <a href="/tags/go/" style="font-size: 12.5px;">go</a> <a href="/tags/gzip/" style="font-size: 10px;">gzip</a> <a href="/tags/hook/" style="font-size: 10px;">hook</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/mod-php/" style="font-size: 10px;">mod_php</a> <a href="/tags/ntp/" style="font-size: 10px;">ntp</a> <a href="/tags/supervisor/" style="font-size: 10px;">supervisor</a> <a href="/tags/web/" style="font-size: 10px;">web</a> <a href="/tags/zimg/" style="font-size: 12.5px;">zimg</a>
					</div>
				</section>
				
				
				

				
				
				<section class="switch-part switch-part3">
				
					<div id="js-aboutme">true</div>
				</section>
				
			</div>
		</div>
	</header>				
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide">Aurthur</h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img lazy-src="/uploads/blog.png" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author">Aurthur</h1>
			</hgroup>
			
			<p class="header-subtitle">Aurthur Blog</p>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/archives">所有文章</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/aurthurxlc" title="github">github</a>
			        
						<a class="zhihu" target="_blank" href="https://www.zhihu.com/people/aurthur" title="zhihu">zhihu</a>
			        
						<a class="mail" target="_blank" href="/aurthurxlc@gmail.com" title="mail">mail</a>
			        
						<a class="google" target="_blank" href="https://plus.google.com/u/0/110645540964195673210" title="google">google</a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>
      <div class="body-wrap"><article id="post-linux-datetime-sync" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/Aurthur-2016/linux-datetime-sync.html" class="article-date">
  	<time datetime="2017-01-07T12:46:31.000Z" itemprop="datePublished">2017-01-07</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Linux 机器时钟同步
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
	<div class="article-tag tagcloud">
		<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Linux/">Linux</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/ntp/">ntp</a></li></ul>
	</div>

        
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/Technical/">Technical</a>
	</div>


        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="前言">前言</h2><p>在Linux系统中，为了避免主机时间因为在长时间运行下所导致的时间偏差。Linux系统下，一般使用ntp服务来同步不同机器的时间。</p>
<p>NTP 是网络时间协议（Network Time Protocol）的简称，就是通过网络协议使计算机之间的时间同步化。</p>
<p>准确的系统时间是稳定服务的基础，本文介绍与时间相关的Linux操作、以及如何为自己的Linux服务器维护准确的时间。</p>
<a id="more"></a>
<h2 id="时间基本操作">时间基本操作</h2><p>一台Linux服务器有两个时间源，一个是硬件时间，即服务器硬件CMOS维护的时间，还有一个操作系统维护的时间，前者通过hwclock命令来访问，后者则主要通过date命令来访问。</p>
<p>date是最常用的时间相关的命令，例如：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 获取当前时间</span></span><br><span class="line">$ date</span><br><span class="line">Fri Jan 23 15:22:16 CST 2015</span><br><span class="line"></span><br><span class="line"><span class="comment"># 以特定格式输出当前时间，格式字符串前以"+"开头，例如获得当前时间的epoch</span></span><br><span class="line">$ date +%s</span><br><span class="line">1421998051</span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置当前时间</span></span><br><span class="line">$ sudo date <span class="_">-s</span> <span class="string">"2016-01-22 00:00:00"</span></span><br><span class="line">Thu Jan 22 00:00:00 CST 2016</span><br></pre></td></tr></table></figure>
<p>hwclock命令用于访问服务器的硬件CMOS时间，例如：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 获取系统硬件时间</span></span><br><span class="line">$ sudo hwclock</span><br><span class="line">Fri 23 Jan 2015 03:33:17 PM CST  -0.567492 seconds</span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置操作系统的软件时间，与系统硬件时间同步</span></span><br><span class="line">$ sudo hwclock <span class="_">-s</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置系统硬件时间，与操作系统的软件时间同步</span></span><br><span class="line">$ sudo hwclock -w</span><br></pre></td></tr></table></figure>
<p>系统时间和硬件时间的同步<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 把系统时间设置成硬件时间</span></span><br><span class="line">hwclock --systohc</span><br><span class="line"></span><br><span class="line"><span class="comment"># 硬件时间设置成系统时间</span></span><br><span class="line">hwclock --hctosys</span><br></pre></td></tr></table></figure></p>
<h2 id="时间相关背景">时间相关背景</h2><h3 id="NTP_通信协议原理">NTP 通信协议原理</h3><ol>
<li><p>首先主机启动 NTP</p>
</li>
<li><p>客户端会向 NTP 服务器发送调整时间的 message</p>
</li>
<li><p>然后 NTP server 会送出当前的标准时间给 client</p>
</li>
<li><p>client 接受来自 server 的时间后，会根据这个信息来调整自己的时间</p>
</li>
</ol>
<blockquote>
<p>NTP 这个 deamon 采用了 UDP 123 端口，如果有防火墙，请允许该端口访问网络</p>
</blockquote>
<h3 id="相关的命令和配置文件">相关的命令和配置文件</h3><ul>
<li><p>/etc/ntp.conf: NTP唯一的一个设置文件，linux各版本虽然目录不同，但文件名相同。可以用which ntp.conf 或者locate ntp.conf来查找</p>
</li>
<li><p>/usr/share/zoneinfo/: 这个里面规定了这个主要时区的时间设置文件</p>
</li>
<li><p>/etc/sysconfig/clock: 这个文件是linux的主要时区设置文件，每次开机后linux会自动读取这个文件来设置系统所默认的显示时间，里面内容示例：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">cat /etc/sysconfig/clock</span><br><span class="line"><span class="comment"># The ZONE parameter is only evaluated by system-config-date.</span></span><br><span class="line"><span class="comment"># The timezone of the system is defined by the contents of /etc/localtime.</span></span><br><span class="line">ZONE=<span class="string">"Asia/Shanghai"</span></span><br><span class="line">UTC=<span class="literal">true</span></span><br><span class="line">ARC=<span class="literal">false</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>/etc/localtime: 本地端时间配置文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 设置时区</span></span><br><span class="line">ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime</span><br><span class="line"><span class="comment"># 或</span></span><br><span class="line">cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime</span><br></pre></td></tr></table></figure>
</li>
<li><p>/bin/date: 这个是时间的修改命令，可以输出时间，也可以修改时间</p>
</li>
<li><p>/sbin/hwclock: 因为linux系统上面BIOS时间与linux系统时间是分开的，所以使用date这个指令调整了时间之后，还需要使用hwclock才能将修改过的时间写入BIOS中</p>
</li>
<li><p>/usr/sbin/ntpd: 这是NTP的daemon文件，需要启动它才能提供NTP服务，这个命令会读取/etc/ntp.conf里面的设置</p>
</li>
<li><p>/usr/sbin/ntpdate: 这是 client 用来连接 NTP Server 的主要执行文件，如果您不想启用 NTP，只想启用 NTP Client 功能的话，可以只应用此命令</p>
</li>
<li><p>/usr/sbin/ntptrace: 可以用来追踪某台时间服务器的时间对应关系</p>
</li>
</ul>
<h2 id="时间同步">时间同步</h2><h3 id="ntpd_与_ntpdate_的区别">ntpd 与 ntpdate 的区别</h3><p>简单来说，ntpd 是校准时间（渐变），ntpdate 是调整时间（跳跃）</p>
<h3 id="ntpdate_方式同步">ntpdate 方式同步</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 先安装 ntpdate</span></span><br><span class="line">yum install ntpdate</span><br><span class="line"></span><br><span class="line"><span class="comment"># 从服务器更新时间</span></span><br><span class="line">ntpdate cn.pool.ntp.org</span><br></pre></td></tr></table></figure>
<h3 id="ntp方式">ntp方式</h3><p>CentOS下安装配置ntp服务的步骤如下<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装ntp服务的软件包</span></span><br><span class="line">sudo yum install ntp</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将ntp服务设置为缺省启动</span></span><br><span class="line">sudo chkconfig ntpd on</span><br><span class="line"></span><br><span class="line"><span class="comment"># 修改启动参数，增加-g -x参数，允许ntp服务在系统时间误差较大时也能正常工作</span></span><br><span class="line">sudo vi /etc/sysconfig/ntpd</span><br><span class="line"></span><br><span class="line"><span class="comment"># 启动ntp服务</span></span><br><span class="line">sudo service ntpd restart</span><br></pre></td></tr></table></figure></p>
<p>Ubuntu/Debian下安装配置ntp服务的步骤如下<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装ntp服务的软件包</span></span><br><span class="line">sudo apt-get install ntp</span><br><span class="line"></span><br><span class="line"><span class="comment"># 修改启动参数，增加-g -x参数，允许ntp服务在系统时间误差较大时也能正常工作</span></span><br><span class="line">sudo vi /etc/default/ntp</span><br><span class="line"></span><br><span class="line"><span class="comment"># 启动ntp服务</span></span><br><span class="line">sudo service ntp restart</span><br></pre></td></tr></table></figure></p>
<h3 id="同步状态查看">同步状态查看</h3><p>ntp 服务运行后，可以通过如下命令查看与上游时间服务器的同步情况</p>
<blockquote>
<p>ntpq -p</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">ntpq -p</span><br><span class="line"></span><br><span class="line">remote           refid      st t when poll reach   delay   offset  jitter</span><br><span class="line">==============================================================================</span><br><span class="line">ntp.tums.ac.ir  .INIT.          16 u    -   64    0    0.000    0.000   0.000</span><br><span class="line">+time6.aliyun.co 10.137.38.86     2 u   18   64    1   27.059    4.211   0.367</span><br><span class="line">*ptr.dns1.js.chi 61.160.246.234   2 u   17   64    1   14.669    3.108   4.363</span><br></pre></td></tr></table></figure>
<h2 id="推荐几个时间同步服务器">推荐几个时间同步服务器</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">cn.pool.ntp.org</span><br><span class="line">asia.pool.ntp.org</span><br><span class="line">time1-7.aliyun.com (阿里云 7 个服务器)</span><br><span class="line">ntp.sjtu.edu.cn 202.120.2.101 (上海交通大学网络中心NTP服务器地址）</span><br><span class="line">s1a.time.edu.cn 北京邮电大学</span><br><span class="line">s1b.time.edu.cn 清华大学</span><br><span class="line">s1c.time.edu.cn 北京大学</span><br><span class="line">s1d.time.edu.cn 东南大学</span><br><span class="line">s1e.time.edu.cn 清华大学</span><br><span class="line">s2a.time.edu.cn 清华大学</span><br><span class="line">s2b.time.edu.cn 清华大学</span><br><span class="line">s2c.time.edu.cn 北京邮电大学</span><br><span class="line">s2d.time.edu.cn 西南地区网络中心</span><br><span class="line">s2e.time.edu.cn 西北地区网络中心</span><br><span class="line">s2f.time.edu.cn 东北地区网络中心</span><br><span class="line">s2g.time.edu.cn 华东南地区网络中心</span><br><span class="line">s2m.time.edu.cn 北京大学</span><br><span class="line">time.nist.gov</span><br><span class="line">time.nuri.net</span><br></pre></td></tr></table></figure>

      
    </div>
    
  </div>
  
    
<nav id="article-nav">
  
    <a href="/Aurthur-2016/how-to-install-supervisor-on-centos-6.html" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption"><</strong>
      <div class="article-nav-title">
        
          Centos 6 安装 Supervisor
        
      </div>
    </a>
  
  
    <a href="/Aurthur-2015/Become-an-Outstanding-Java-Developer.html" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">Become an Outstanding Java Developer</div>
      <strong class="article-nav-caption">></strong>
    </a>
  
</nav>

  
</article>






</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
    	<div class="footer-left">
    		&copy; 2017 Aurthur
    	</div>
      	<div class="footer-right">
      		<a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
      	</div>
    </div>
  </div>
</footer>
    </div>
    
  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">


<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>
<script src="/js/jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>






<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  </div>
</body>
</html>